package util;

import java.io.File;
import java.util.Scanner;

public class ListFile {
	Scanner s = null;
	
	public ListFile(File file) throws Exception
	{
		s = new Scanner(file, "UTF-8");
	}
	
	public ListFile(String fileName) throws Exception
	{
		s = new Scanner(new File(Util.fixPath(fileName)), "UTF-8");
	}
	
	public ListGroup getNext()
	{
		ListGroup g = null;
		
		try {
			g = new ListGroup(s);
		} catch (Exception e) {
			g = null;
		}
		
		return g;
	}
}
